﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Summary description for NhanVien
/// </summary>
public class NhanVien
{
	public NhanVien()
	{	
	}
    private int phg;

    public int Phg
    {
        get { return phg; }
        set { phg = value; }
    }

    public string Tk { get; set; }
    public string Policy { get; set; }

    public DataTable LoadDanhSachNhanVienThuocPhong()
    {
        string proName = "sp_LoadDanhSachNhanVienThuocPhong";
        DataService ds = new DataService();      
        ds.Connect();
        SqlParameter[] parameters = new SqlParameter[1];
        parameters[0] = new SqlParameter("@phg", Phg);
        DataTable table = ds.ExcuteProcedureGetTable(proName, parameters);
        ds.Disconnect();
        return table;
    }
    public DataTable LoadNhanVienCoTaiKhoan()
    {
        string proName = "sp_LoadNhanVienCoTaiKhoan";
        DataService ds = new DataService();
        ds.Connect();
        SqlParameter[] parameters = new SqlParameter[1];
        parameters[0] = new SqlParameter("@TaiKhoan", Tk);
        DataTable table = ds.ExcuteProcedureGetTable(proName, parameters);
        ds.Disconnect();
        return table;
    }
}